-- GENERATED SPELL FOR [Gunnar Thorvardsson] --


function spell0_24162(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41057,pUnit)
pUnit:RegisterEvent('Sorts_24162', 648, 1)
end

function spell1_24162(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41056,pUnit)
pUnit:RegisterEvent('Sorts_24162', 2000, 1)
end

function Sorts_24162(pUnit, Event)
local choix_sorts_24162 = math.random(0, 1)
if choix_sorts_24162 == 0 then
pUnit:RegisterEvent('spell0_24162', 1, 1)
end
if choix_sorts_24162 == 1 then
pUnit:RegisterEvent('spell1_24162', 1, 1)
end
end

function mob24162_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24162', math.random(1500, 3000), 1)
end

function mob24162_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24162_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24162_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24162, 1, 'mob24162_Action')
RegisterUnitEvent(24162, 2, 'mob24162_Leave')
RegisterUnitEvent(24162, 3, 'mob24162_Kill')
RegisterUnitEvent(24162, 4, 'mob24162_Die')
